package com.sinosoft.bee.services.provider.demo.service;

import com.sinosoft.bee.services.provider.demo.dao.DemoMapper;
import com.sinosoft.bee.services.provider.demo.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author:TobbyQuinn
 * @date:2018/5/14
 * @project:bee
 **/
@Service
@Transactional
public class UserService {
    @Autowired
    DemoMapper demoMapper;

    public void addUser(User user) {
        demoMapper.insertUser(user);
    }

    public User findById(String id) {
        return demoMapper.findById(id);
    }
    public User findById2(String id) {
        return demoMapper.findById2(id);
    }

    public void updateUser(User user) {
        demoMapper.updateUserById(user);
    }

    public void deleteById(User user) {
        demoMapper.deleteUserById(user);
    }
}
